package org.example.jdbc.service;

import org.example.jdbc.dao.InfoDao;
import org.example.jdbc.entity.Info;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class InfoServiceImpl implements InfoService {
    @Autowired
    private InfoDao infoDao;
    @Override
    public int add(Info info) {
        return infoDao.add(info);
    }

    @Override
    public int del(Integer id) {
        return infoDao.del(id);
    }

    @Override
    public int update(Info info) {
        return infoDao.update(info);
    }

    @Override
    public Info get(Integer id) {
        return infoDao.get(id);
    }

    @Override
    public List<Info> getAll() {
        return infoDao.getAll();
    }
}
